home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The X-Philes (2nd Revision)
/
The X-Philes Number 1 (1995).iso
/
xphiles
/
hp48_2
/
unasc.pl
< prev
next >
Wrap
Perl Script
|
1991-04-12
|
338b
|
23 lines
#!/usr/unsup/perl
# unasc
# A perl program to extract a HP-48 binary from a text file containing a
# ->ASC program.
#
# Usage: unasc file > binfile
#
# Written by Wayne Scott 1990
while (<>) {
next if (!(/^%%HP/../"$/));
chop;
$file .= $_;
}
$file =~ s/.*"(\w*)\w{4}".*/$1/;
$file =~ s/(..)/pack("C",hex($1))/eg;
print $file;